function xishu=Beamingfactor(beaming,b)
switch beaming
    case 0
        xishu=1;
    case 1
        xishu=b;
    case 2
%         xishu = (8*b).^0.5/pi;
        xishu = sqrt( 2*b * ( 1 - b/2) );
    case 3
        xishu=acos(1-b)*2/pi;
end
end